The names of file objects, such as directories and files, in a file system can be referenced in a case sensitive (CS) manner or case insensitive (CI) manner. Case sensitivity refers to whether or not the combination of upper and lower case letters that constitute the name of the file object is significant. Case sensitivity applies to languages that have case-sensitive alphabetic characters, including but not limited to the Latin alphabet, Greek alphabet, Cyrillic alphabet, and so on. For example, in a case sensitive context, the name “FooBar” is different from the name “fooBar”. In a case insensitive context, “Foo_Bar”, “foo_Bar”, or any other combination of upper and lower cases of the letters are all deemed to be equivalent or the same. This last example further illustrates that case sensitivity does not apply to non-alphabetic characters, such as underscore (_), dollar sign ($), ampersand (&), and so on.
Some file systems, such as ext4 and btrfs, support only case sensitive (CS) lookup of file objects (files, directories). Some file systems such as HFS+ can support either CS lookup or CI lookup, but not at the same time. The HFS+ volume has to be formatted as either a CS file system or a CI file system. In order to change the case sensitivity of the file system, the HFS+ volume would have to be erased and reformatted, which in a live system is not possible as a practical matter since the resulting complete disruption of service is not likely to be tolerated.
Some file systems, such as NTFS and HFS+, support case insensitive (CI) lookup with case preserving (CP) semantics where file objects can be created using mixed upper and lower case letters but can only be retrieved in a case insensitive manner. For example, suppose a file called “FooBar” is created. The file will be stored with the case of its file name preserved; in this case, “FooBar.” For example, a listing of the directory will show “FooBar.” However, the file can be accessed (e.g., for reading or writing) in a CI manner using any combination of upper and lower case letters (case insensitive lookup); for example, “foobar”, “FOObar”, “fooBAR”, and so on all can be used to access the file. Case preserving semantics also allows the file to be renamed (e.g., to “fOObAR”) to change the name on-disk, but still be accessed in a CI manner.
Nonetheless, there are use cases where both CS and CI capabilities are needed on the same volume. Some file services provide a unified stack supporting both a service message block (SMB) based file system and a network file system (NFS). If the underlying file system can only support one type of case sensitivity, that can make file lookups using the other case sensitivity very slow. For example, the Samba™ file server (a popular open source SMB type of server) supports CI lookups on an ext4 file system, but ext4 only provides CS lookups on disk. The Samba™ file server must read the whole file system directory of the ext4 file system into memory in order to perform a CI lookup, which can be slow and memory intensive for large file systems and may be impractical, or even impossible, for very large file systems.